Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

314
Views
{"error":"unsupported_grant_type","error_description":"falta el parámetro grant_type"} para la API de Spotify

Uso de la documentación de Spotify para el flujo de credenciales del cliente ( https://developer.spotify.com/documentation/general/guides/authorization/client-credentials/ )

Pude crear una solicitud de API en javascript:

 function getoAuth () { const client_id = id; const client_secret = secret; fetch("https://accounts.spotify.com/api/token", { method: 'POST', headers: { 'Content-type': 'application/x-www-form-urlencoded', 'Authorization': 'Basic' + (client_id + ":" + client_secret).toString('base64') }, form: { grant_type: 'client_credentials', }, json: true }) }

Pero recibo el siguiente error: {"error":"unsupported_grant_type","error_description":"grant_type parameter is missing"}

¿Por qué está fallando esto?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Verifique los documentos de la biblioteca de búsqueda, debe pasar los datos del formulario a través del campo del cuerpo. https://developer.mozilla.org/en-US/docs/web/api/fetch

 fetch("https://accounts.spotify.com/api/token", { method: 'POST', headers: { 'Content-type': 'application/x-www-form-urlencoded', 'Authorization': 'Basic<>' }, body: new URLSearchParams({ 'grant_type': 'client_credentials' }), json: true })

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!